Hi,
I have DXL code used to create Formal Module (this script create all headers attributs, views).
I want have for this new module (and only for modules created by this script) a menu or a button to do some actions.
Is it possible ? And if yes, how ?
Thanks
Regards
Pierre Dubarry
PDU - Thu Oct 01 11:53:10 EDT 2009 |
|
Re: how create specific menu or button when creating formal module by DXL ? dpechacek - Thu Oct 01 12:16:58 EDT 2009
Scripts put in the addins/user folder show up under the User menu in a Formal module. Alternatively, you can modify the formal.dxl file to change what menus are in the formal module including the right click menu.
New folders in the addins folder create new menus other than the User menu. You just need a <foldername>.idx and <foldername>.hlp file in each folder.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
|
|
Re: how create specific menu or button when creating formal module by DXL ? PDU - Thu Oct 01 12:29:48 EDT 2009 dpechacek - Thu Oct 01 12:16:58 EDT 2009
Scripts put in the addins/user folder show up under the User menu in a Formal module. Alternatively, you can modify the formal.dxl file to change what menus are in the formal module including the right click menu.
New folders in the addins folder create new menus other than the User menu. You just need a <foldername>.idx and <foldername>.hlp file in each folder.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Yes,
but in this case, i change menus for all formal modules.
I need chang emenu only for specific formal menu, for example module created by a specific template (and identified by a module attribut perhaps)
Pierre Dubarry
|
|
Re: how create specific menu or button when creating formal module by DXL ? SystemAdmin - Thu Oct 01 13:07:50 EDT 2009 dpechacek - Thu Oct 01 12:16:58 EDT 2009
Scripts put in the addins/user folder show up under the User menu in a Formal module. Alternatively, you can modify the formal.dxl file to change what menus are in the formal module including the right click menu.
New folders in the addins folder create new menus other than the User menu. You just need a <foldername>.idx and <foldername>.hlp file in each folder.
AAI Services, Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
You may have to look at a module specific trigger to implement.
|
|
Re: how create specific menu or button when creating formal module by DXL ? Peter_Albert - Fri Oct 02 03:11:17 EDT 2009 SystemAdmin - Thu Oct 01 13:07:50 EDT 2009
You may have to look at a module specific trigger to implement.
Well, you could probably implement it with two module level triggers. Assume you have created your specific script in addins/tools, with corresponding files tools.idx and tools.hlp. If you rename the tools.hlp to e.g. _tools.hlp, then the menu entry is not visible in any formal module.
Now, if for the specific script you define a pre-open trigger which renames _tools.hlp to tools.hlp, then the menu would be visible for the module (and all other modules opened at the same time!). A second post-open trigger then would rename it back to _tools.hlp, effectively hiding it for all other modules.
A quick check indicated that the menu still works for the specific script, even with the wrong filename for the .hlp file.
I just said it would probably work, but I am not sure I'd suggest it ...
Peter
|
|
Re: how create specific menu or button when creating formal module by DXL ? PDU - Fri Oct 02 12:39:28 EDT 2009 Peter_Albert - Fri Oct 02 03:11:17 EDT 2009
Well, you could probably implement it with two module level triggers. Assume you have created your specific script in addins/tools, with corresponding files tools.idx and tools.hlp. If you rename the tools.hlp to e.g. _tools.hlp, then the menu entry is not visible in any formal module.
Now, if for the specific script you define a pre-open trigger which renames _tools.hlp to tools.hlp, then the menu would be visible for the module (and all other modules opened at the same time!). A second post-open trigger then would rename it back to _tools.hlp, effectively hiding it for all other modules.
A quick check indicated that the menu still works for the specific script, even with the wrong filename for the .hlp file.
I just said it would probably work, but I am not sure I'd suggest it ...
Peter
Thanks to dpechacek for the suggestion about formal.dxl
formal.dxl use autoRunDXLFolder(),
and for user defined formal menu entries : autoRunDXLFolder("lib/dxl/config/formalfiles")
In this folder, i put a DXL file to create menu and item menu, depending test on the value of a specific module attribut.
It works fine.
Regards
Pierre Dubarry
|
|